package com.cmwa.scbp.business.postMaintenance.entity;

import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.type.Alias;

import com.cmwa.scbp.base.constants.Constant;
import com.cmwa.scbp.base.mvc.entity.BaseVo;
import com.cmwa.scbp.utils.cached.EmployeeCached;

/**
 * 岗位人员变更表实体
 * 
 * @author ex-sujh
 * @date 2019-02-22 10:46:12
 */
@Alias("postPersonnelChangeVo")
public class PostPersonnelChangeVo extends BaseVo {
	    
    /**
     * 主键ID

	 */
    private String id; 
	    
    /**
     * 岗位ID

	 */
    private String postId; 
	    
    /**
     * 资源ID

	 */
    private String resourceId; 
	    
    /**
     * 变更前岗位人员ID

	 */
    private String oldPersonnelId; 
    
    private String oldPersonnelNm;
	    
    /**
     * 变更后岗位人员ID

	 */
    private String newPersonnelId; 
    
    private String newPersonnelNm;
	    
    /**
     * 变更生效日

	 */
    private String effctiveDate; 
	    
    /**
     * 备注

	 */
    private String remark; 
	    
    /**
     * 是否生效 Y:已生效 N:未生效

	 */
    private String handleStatus; 
    
    private String handleStatusNm;
	    
    /**
     * 状态

	 */
    private String status; 
	    
    /**
     * 创建人

	 */
    private String createId; 
	    
    /**
     * 创建时间

	 */
    private String createTime; 
	    
    /**
     * 是否同步到岗位表 0：未同步 1：已同步
	 */
    private String isUse; 
	    
    /**
     * 修改人
	 */
    private String modifyId; 
	    
    /**
     * 修改时间
	 */
    private String modifyTime; 
			
	private String prjCode;         // 系列产品ID
	private String prjSName;        // 系列产品简称
	private String postTitle;       // 岗位名称
	private String postCode;        // 岗位CODE
	private String postRank;        // 岗位层级
	private String postRankNm;      // 岗位层级名称
	private String companyId;     // 管理人简称
	private String companyName;     // 管理人简称
    
	/**
     * 主键ID

	 */
    public String getId () {
        return id;
    }
    public void setId (String id) {
        this.id = id;
    }
		
	/**
     * 岗位ID

	 */
    public String getPostId () {
        return postId;
    }
    public void setPostId (String postId) {
        this.postId = postId;
    }
		
	/**
     * 资源ID

	 */
    public String getResourceId () {
        return resourceId;
    }
    public void setResourceId (String resourceId) {
        this.resourceId = resourceId;
    }
		
	/**
     * 变更前岗位人员ID

	 */
    public String getOldPersonnelId () {
        return oldPersonnelId;
    }
    public void setOldPersonnelId (String oldPersonnelId) {
        this.oldPersonnelId = oldPersonnelId;
    }
		
	/**
     * 变更后岗位人员ID

	 */
    public String getNewPersonnelId () {
        return newPersonnelId;
    }
    public void setNewPersonnelId (String newPersonnelId) {
        this.newPersonnelId = newPersonnelId;
    }
		
	/**
     * 变更生效日

	 */
    public String getEffctiveDate () {
        return effctiveDate;
    }
    public void setEffctiveDate (String effctiveDate) {
        this.effctiveDate = effctiveDate;
    }
		
	/**
     * 备注

	 */
    public String getRemark () {
        return remark;
    }
    public void setRemark (String remark) {
        this.remark = remark;
    }
		
	/**
     * 是否生效 Y:已生效 N:未生效

	 */
    public String getHandleStatus () {
        return handleStatus;
    }
    public void setHandleStatus (String handleStatus) {
        this.handleStatus = handleStatus;
    }
		
	/**
     * 状态

	 */
    public String getStatus () {
        return status;
    }
    public void setStatus (String status) {
        this.status = status;
    }
		
	/**
     * 创建人

	 */
    public String getCreateId () {
        return createId;
    }
    public void setCreateId (String createId) {
        this.createId = createId;
    }
		
	/**
     * 创建时间

	 */
    public String getCreateTime () {
        return createTime;
    }
    public void setCreateTime (String createTime) {
        this.createTime = createTime;
    }
		
	/**
     * 是否同步到岗位表 0：未同步 1：已同步
	 */
    public String getIsUse () {
        return isUse;
    }
    public void setIsUse (String isUse) {
        this.isUse = isUse;
    }
		
	/**
     * 修改人
	 */
    public String getModifyId () {
        return modifyId;
    }
    public void setModifyId (String modifyId) {
        this.modifyId = modifyId;
    }
		
	/**
     * 修改时间
	 */
    public String getModifyTime () {
        return modifyTime;
    }
    public void setModifyTime (String modifyTime) {
        this.modifyTime = modifyTime;
    }
    
    
	public String getPrjSName() {
		return prjSName;
	}
	public void setPrjSName(String prjSName) {
		this.prjSName = prjSName;
	}
	
	public String getOldPersonnelNm() {
		if (StringUtils.isNotBlank(oldPersonnelId)) {
			return EmployeeCached.getAllName(oldPersonnelId);
		}
		return oldPersonnelNm;
	}
	public void setOldPersonnelNm(String oldPersonnelNm) {
		this.oldPersonnelNm = oldPersonnelNm;
	}
	
	public String getNewPersonnelNm() {
		if (StringUtils.isNotBlank(newPersonnelId)) {
			return EmployeeCached.getAllName(newPersonnelId);
		}
		return newPersonnelNm;
	}
	public void setNewPersonnelNm(String newPersonnelNm) {
		this.newPersonnelNm = newPersonnelNm;
	}
	
	public String getPrjCode() {
		return prjCode;
	}
	public void setPrjCode(String prjCode) {
		this.prjCode = prjCode;
	}
	
	public String getPostTitle() {
		return postTitle;
	}
	public void setPostTitle(String postTitle) {
		this.postTitle = postTitle;
	}
	
	public String getPostCode() {
		return postCode;
	}
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}
	
	public String getPostRank() {
		return postRank;
	}
	public void setPostRank(String postRank) {
		this.postRank = postRank;
	}
	
	public String getPostRankNm() {
		return postRankNm;
	}
	public void setPostRankNm(String postRankNm) {
		this.postRankNm = postRankNm;
	}
	
	public String getHandleStatusNm() {
		if (StringUtils.isNotBlank(handleStatus)) {
			if (StringUtils.equals(Constant.C_STATUS_Y, handleStatus)) {
				return "已生效";
			} else {
				return "未生效";
			}
		}
		return handleStatusNm;
	}
	public void setHandleStatusNm(String handleStatusNm) {
		this.handleStatusNm = handleStatusNm;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getCompanyId() {
		return companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
}
